//
//  StoreTableViewCell.m
//  JiZhuiAn
//
//  Created by Easy.Lin on 16/7/14.
//  Copyright © 2016年 Easy. All rights reserved.
//

#import "StoreTableViewCell.h"
#import <UIImageView+WebCache.h>

@implementation StoreTableViewCell

+ (UINib *)cellNib {
    return [UINib nibWithNibName:NSStringFromClass(self.class) bundle:nil];
}

+ (NSString *)CellReuseIdentifier {
    return NSStringFromClass(self.class);
}

+ (CGFloat)cellHeight{
    return 90;
}

- (void)setParam:(BmobObject *)data
{
    
    commodityData * each = [[commodityData alloc] initFromBmobObject:data];
    [self.commodityImageView sd_setImageWithURL:[NSURL URLWithString:each.commodityImageURL]];
    self.commodityNameLabel.text = each.commodityName;
    self.commodityPriceLabel.text = each.commodityPrice;
    self.commodityGoodPercentLabel.text = [NSString stringWithFormat:@"%.2f%%",each.commodityGoodPercent];
    self.commoditySalesNumberLabel.text = [NSString stringWithFormat:@"%zd件",each.commoditySalesNumber];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
